<?php

use Illuminate\Database\Seeder;

class AdminSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $password = \Illuminate\Support\Facades\Hash::make('12345678');
        \App\Models\Auth\Admin::query()->insert(
            [
                [
                    'admin_id' => 1,
                    'name' => 'jqcool',
                    'tel' => 15916170801,
                    'password' => $password,
                    'supper' => 1,
                    'created_at' => date('Y-m-d H:i:s'),
                    'updated_at' => date('Y-m-d H:i:s'),
                ],
                [
                    'admin_id' => 2,
                    'name' => 'paco',
                    'tel' => 15916170802,
                    'password' => $password,
                    'supper' => 0,
                    'created_at' => date('Y-m-d H:i:s'),
                    'updated_at' => date('Y-m-d H:i:s'),
                ]
            ]
        );


        \Illuminate\Support\Facades\DB::table('admin_roles')->insert(
            [
                'admin_id' => 2,
                'role_id' => 1
            ]
        );

    }
}
